<template>
    <section>
        <div style="text-align:center;">
            <div id='print' v-if="!loading" style='width:930px;   margin: auto'>
                <!--startprint-->
                <h2>杭州穿否电子商务有限公司生产工艺单</h2>
                <!--endprint-->

                <table class="tp tb1">

                    <tbody>
                        <tr>
                            <th style="width:10%">客户</th>
                            <td style="width:23%">

                                <span v-text="currObj.customerName"></span>
                            </td>
                            <th style="width:10%">款号</th>

                            <td style="width:23%">
                                <span v-text="currObj[flowClassId].modelNo"></span>
                            </td>
                            <th style="width:10%">下单日期</th>
                            <td style="width:23%">
                                <span v-text="fmtDate(currObj.createTime)"></span>
                            </td>
                        </tr>
                        <tr>
                            <th rowspan="5"></th>
                            <td rowspan="5">
                                <img :src="currObj.imgUrl" style='width:100%' alt="">

                            </td>
                            <th>工艺</th>
                            <td>

                                <input v-model="currObj[flowClassId].print.gongyidan.memoArray[10].key" type="text">
                            </td>
                            <th>报价日期</th>
                            <td>
                                <span v-text="fmtDate()"></span>
                            </td>
                        </tr>
                        <tr>

                            <th>联系方式</th>
                            <td>
                                <input v-model="currObj[flowClassId].print.gongyidan.memoArray[10].value" type="text">
                            </td>
                            <td> <input v-model="currObj[flowClassId].print.gongyidan.memoArray[0].key" type="text"></td>
                            <td> <input v-model="currObj[flowClassId].print.gongyidan.memoArray[0].value" type="text"></td>
                        </tr>
                        <tr>

                            <th> <input v-model="currObj[flowClassId].print.gongyidan.memoArray[1].key" type="text"></th>
                            <td> <input v-model="currObj[flowClassId].print.gongyidan.memoArray[1].value" type="text"></td>
                            <th> <input v-model="currObj[flowClassId].print.gongyidan.memoArray[2].key" type="text"></th>
                            <td> <input v-model="currObj[flowClassId].print.gongyidan.memoArray[2].value" type="text"></td>
                        </tr>
                        <tr>

                            <th><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[3].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[3].value"></td>
                            <th><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[4].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[4].value"></td>
                        </tr>
                        <tr>

                            <th><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[5].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[5].value"></td>
                            <th><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[6].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[6].value"></td>
                        </tr>
                        <tr>
                            <th><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[7].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[7].value"></td>
                            <th><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[8].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[8].value"></td>
                            <th><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[9].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.gongyidan.memoArray[9].value"></td>
                        </tr>
                    </tbody>
                </table>
                <div v-if="currObj[flowClassId].t300">

                    <h2>制版信息</h2>
                    <table class="tp">
                        <thead>
                            <tr>
                                <th style="width:120px">部位
                                </th>
                                <th :key='sizeId' v-for="(sizeId,index) in currObj[flowClassId].sizeIdArray">

                                    {{getSizeName(sizeId)}} <i :key='sizeId' v-show="sizeId==currObj[flowClassId].defaultSizeId"
                                        class='el-icon-star-on'></i>

                                </th>
                                <th>量法
                                </th>
                                <th>误差
                                </th>
                                <th>裆差
                                </th>

                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(item,index) in currObj[flowClassId].t300">
                                <td>
                                    <span v-text="item.part"></span>

                                </td>
                                <td :key='sizeId' v-for="(sizeId,index) in currObj[flowClassId].sizeIdArray" :label="getSizeName(sizeId)">
                                    <template>
                                        <span v-text="item[sizeId]"></span>

                                    </template>

                                </td>
                                <td>
                                    <template>
                                        <span v-text="item.method"></span>

                                    </template>
                                </td>
                                <td>
                                    <template>
                                        <span v-text="item.errorRange"></span>
                                        </el-input>
                                    </template>
                                </td>
                                <td>
                                    <template>
                                        <span v-text="item.dangRange"></span>
                                        </el-input>
                                    </template>
                                </td>

                            </tr>
                        </tbody>
                    </table>
                </div>
                <div>
                    <h2>下单数</h2>
                    <table class="tp">
                        <thead>
                            <tr>
                                <th style="width:120px">颜色</th>
                                <th v-for='(sizeId,index) in currObj[flowClassId].sizeIdArray' v-text="getSizeName(sizeId)">
                                </th>
                                <th style="width:120px">合计</th>
                            </tr>

                        </thead>
                        <tbody>
                            <tr v-for='(color,colorIndex) in currObj[flowClassId].data'>
                                <td>
                                    <span v-text='color.colorName' placeholder="0" style="width: 100px;"></span>
                                </td>
                                <td v-for='(size,index) in color.sizeArray'>
                                    <span class="txt_num" :controls='false' v-text="size.num"></span>
                                </td>
                                <td>
                                    {{heji(color.sizeArray)}}
                                </td>
                            </tr>
                        </tbody>

                    </table>

                </div>
                <div v-if="currObj[flowClassId].t100">
                    <template v-if="currObj[flowClassId].t100.length>0">
                        <h2>面辅料</h2>
                        <table class='tp'>
                            <thead>
                                <tr>
                                    <th style="width:120px">名称</th>
                                    <th>编码</th>
                                    <th>门幅</th>
                                    <th>单件用量</th>
                                    <th style="width:80px">单位</th>
                                    <th style="width:80px">单价</th>
                                    <th style="width:80px">小计</th>

                                </tr>

                            </thead>
                            <tbody>
                                <tr v-for="(item,index) in currObj[flowClassId].t100">
                                    <td>
                                        <span v-text="item.name">1231</span>
                                    </td>
                                    <td>
                                        <span v-text="item.code"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.menfu"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.num"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.unitId"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.price"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.amount"></span>
                                    </td>
                                </tr>

                            </tbody>
                            <tfoot>
                                <tr>
                                    <th colspan="5"></th>
                                    <th>小计</th>
                                    <td>
                                        <span v-text="amount100"></span>
                                    </td>
                                </tr>
                            </tfoot>
                        </table>
                        <table class='tp'>
                            <thead>
                                <tr>
                                    <th style="width:55%">特别指示
                                    </th>
                                    <th>面料处理方式
                                    </th>

                                </tr>
                            </thead>
                            <tbody>
                                <tr style="height:150px">
                                    <td>
                                        <textarea style='border: none;width: 90%; height: 140px;' v-model="currObj[flowClassId].print.gongyidan.mfl.Prompt"></textarea>
                                    </td>
                                    <td>
                                        <ul class="ul_1 m10" style="margin-left:10px">
                                            <li>面料是否预缩:

                                                <input type="checkbox" v-model="currObj[flowClassId].print.gongyidan.mfl.treatmentMode.isYuSuo"></input>


                                            </li>  
                                            <li>预缩方式:
                                                <input style="width:50px" placeholder="" v-model="currObj[flowClassId].print.gongyidan.mfl.treatmentMode.yuSuoFangShi"></input>
                                                缩率:
                                                <input style="width:50px" placeholder="" v-model="currObj[flowClassId].print.gongyidan.mfl.treatmentMode.suoLv"></input>
                                            </li>
                                            <li>面料是否洗水:
                                                <input type="checkbox" v-model="currObj[flowClassId].print.gongyidan.mfl.treatmentMode.isMlXiShui"></input>
                                            </li>
                                            <li>洗水方式:
                                                <input style="width:50px" placeholder="" v-model="currObj[flowClassId].print.gongyidan.mfl.treatmentMode.xiShuiFangShi"></input>
                                                缩率:
                                                <input style="width:50px" placeholder=""></input> 
                                            </li>
                                            <li>成衣是否洗水:
                                                <input type="checkbox" v-model="currObj[flowClassId].print.gongyidan.mfl.treatmentMode.isCyXiShui"></input>
                                            </li>
                                        </ul>
                                    </td>

                                </tr>
                            </tbody>
                        </table>
                    </template>
                </div>
                <template v-if="currObj[flowClassId].t400">
                    <h2>工艺说明</h2>


                    <table class='tp'>
                        <template v-for="(item, index) in  currObj[flowClassId].t400">
                            <thead>
                                <tr>
                                    <th style="width:120px">
                                        <span v-if="item.technologyId!='600'">工艺类型:</span>
                                        <span v-text="getTechnologyName(item.technologyId)" v-if="item.technologyId!='600'"></span>
                                        <span style="width:80%" v-else v-text="item.technologyName">
                                        </span>
                                    </th>
                                    <th style="width:150px">部位</th>
                                    <th>描述</th>
                                    <th style="width:150px">创建时间</th>


                                </tr>
                            </thead>
                            <tbody>
                                <tr style='height:100px' :key='technology.id' v-for="(technology, index2) in item.list">
                                    <td>


                                        <img v-if="technology.imgUrl" slot="reference" :src="technology.imgUrl" style='max-width:80px;max-height:80px' class="itemImg">

                                        <i v-else class="el-icon-picture itemImg" style='width:100px'></i>

                                    </td>
                                    <td>
                                        <span v-text="technology.part"></span>


                                    </td>
                                    <td>
                                        <span v-text="technology.memo"></span>

                                    </td>
                                    <td>
                                        <span v-text="fmtDate(technology.createTime)"></span>
                                    </td>



                                </tr>
                            </tbody>

                        </template>
                    </table>



                </template>





            </div>
        </div>
        <iframe id='ifm' src="/public/print.html" class="ifm_print" frameborder="0"></iframe>
    </section>
</template>
<script src="./technologyPrint.js">

</script>
<style lang="scss" scoped>
    .ul_1 {
        margin: 0;
        padding: 0;
    }

    .ul_1 li {
        list-style: none
    }
</style>